<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style>
        body{
            width:920px;
            margin:0 auto;
        }
        .subject{
        margin: 20px 20px}
        .name{
        font:bond 28px Arial;}
        .name > a{text-decoration:none; color:blue}

    </style>
</head>
<body>
    <h2>千峰教育成都校区所有学科</h2>
    <hr>
    {% for subject in subjects %}
    <!--  Django模板页，可以使用Django模板语言模板指令来生成动态内容  -->
    <div class="subject">
        <p class="name">
            <a href="/teachers/?sno={{subject.no}}">{{ subject.name }}</a>
            &nbsp;&nbsp;&nbsp;&nbsp;
            {% if subject.is_hot %}
            <img src="/static/images/hotfire.png">
            {% endif %}
        </p>
        <p>{{ subject.intro }}</p>
    </div>
    {% endfor %}
</body>
</html>